<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 15-1-30
 * Time: 下午3:14
 */
namespace Admin\Model;
use Think\Model\RelationModel;

class StateModel extends RelationModel {
    //无前缀全表名
    protected $trueTableName = 'char_state_now';
    //关联表
    protected $_link = array(
        'char' => array(
            'mapping_type'   => self::HAS_ONE,
            'foreign_key'    => 'key_link',
            'class_name'     => 'char',
            'mapping_key'    => 'key_link',
            'mapping_name'  => 'charInfo'
        ),
    );

}